<template>
    <div class="px-6">
        <el-form-item label="AI模型" prop="model">
            <div class="w-[560px]">
                <models-select
                    v-model="formData.llm_models"
                />
            </div>
        </el-form-item>
        <el-form-item label="角色词" prop="prompt_roles">
            <div class="w-[560px]">
                <el-input
                    v-model="formData.prompt_roles"
                    placeholder="请详细描述你的角色设定，例如：角色特点和能力"
                    type="textarea"
                    :rows="5"
                />
            </div>
        </el-form-item>
        <el-form-item label="引导词" prop="prompt_limit">
            <div class="w-[560px]">
                <el-input
                    v-model="formData.prompt_limit"
                    placeholder="请详细描述你的角色设定，例如：角色特点和能力"
                    type="textarea"
                    :rows="6"
                />
            </div>
        </el-form-item>
        <div class="w-[650px]">
            <models-setting
                v-model="formData.llm_models"
                :params="formData.llm_config"
                :select="false"
            />
        </div>
    </div>
</template>

<script setup lang="ts">
import { useVModel } from '@vueuse/core'

const props = defineProps<{
    modelValue: Record<string, any>
}>()

const emits = defineEmits<{
    (event: 'update:modelValue', value: Record<string, any>): void
}>()

const formData = useVModel(props, 'modelValue', emits)
</script>
